<html>
<head>
    <title>添加</title>
</head>
<link rel="stylesheet" href="/static/layui/css/layui.css" />
<body>
<form class="layui-form" id="user-add"  action="" lay-filter="detail">
    <input type="hidden" name="loid">
    <div class="layui-form-item">
        <label class="layui-form-label">姓名：</label>
        <div class="layui-input-inline layui-col-md4">
            <input type="text" name="loname" id="loname"  required  lay-verify="required" placeholder="请输入姓名" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">身份证号：</label>
        <div class="layui-input-inline layui-col-md4">
            <input type="text" name="loidcard" id="loidcard"  required  lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">手机号码：</label>
        <div class="layui-input-inline layui-col-md4">
            <input type="text" name="lotel" id="lotel"  required  lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-inline">
        <label class="layui-form-label">入职时间：</label>
        <div class="layui-input-inline">
            <input type="text" name="lotime" id="lotime" lay-verify="lotime" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
</body>

<script src="/static/js/system.js"></script>
<script src="/static/js/jquery-3.3.1.js"></script>
<script src="/static/layui/layui.js"></script>
<script>
    $(function () {
        $("input").prop("disabled","disabled");
    })
    layui.use(['form','laydate'], function(){
        var form = layui.form;
        //单个查询，为修改做准备
        $.ajax({
            url:'/LogisticsServlet?action=findById',
            type:"get",
            dataType:"json",
            data:{"loid":getQueryString("loid")},
            success:function (da) {
                if (da.code == 200) {
                    //form.val("edit",da.data);
                    form.val("detail", { //formTest 即 class="layui-form" 所在元素属性 lay-filter="" 对应的值
                        /*"h_estate": da.date.h_estate+da.date.h_unitNumber+da.date.h_roomNo // "name": "value"
                        ,"l_name": da.date.l_name,*/
                        "loid": da.date.loid
                        ,"loname": da.date.loname
                        ,"loidcard": da.date.loidcard
                        ,"lotel": da.date.lotel
                        ,"lotime": layui.util.toDateString(da.date.lotime, 'yyyy-MM-dd')
                    });
                } else {
                    layer.msg("查询数据失败！");
                }
            }
        });
    });

</script>
</html>